package com.hangwei.paperless.utils;

import android.support.annotation.DrawableRes;
import android.text.TextUtils;

import com.hangwei.paperless.R;

/**
 * Created by 张龙臣 on 2020/11/18.
 */

public class KeyValue {

    public static @DrawableRes
    int getSealPic(String stampTypeCode) {
        if (TextUtils.isEmpty(stampTypeCode))
            return -1;
        int res = 0;
        switch (stampTypeCode) {
//            case "StampType":
//                break;
            case "stampTriangle"://HD维修(蓝色三角形)
                res = R.drawable.seal_hd;
                break;
            case "stampGarden"://HD检验(红色圆形)
                res = R.drawable.seal_hd_round;
                break;
            case "stampRectangleT"://HDT检验章(红色矩形)
                res = R.drawable.seal_hd_rect;
                break;
            case "stampSix"://NDT检验(蓝色六边形)
                res = R.drawable.seal_ndt;
                break;
            case "stampRectangle"://HD检(红色矩形
                res = R.drawable.seal_hd_check;
                break;
        }
        return res;
    }

    /**
     * @return 0 原型   蓝 1圆红   2、3方红
     * */
    public static int getSealType(String stampTypeCode) {
        if (TextUtils.isEmpty(stampTypeCode))
            return -1;
        switch (stampTypeCode) {
            case "stampGarden"://HD检验(红色圆形)
                return 0;
            case "stampSix"://NDT检验(蓝色六边形)
                return 1;
            case "stampTriangle"://HD维修(蓝色三角形)
               return 2;
            case "stampRectangle"://HD检(红色矩形
            case "stampRectangleT"://HDT检验章(红色矩形)
              return 4;
        }
        return -1;
    }
}
